#ifndef YMM
#define YMM

#include <malloc.h>
#include <stdint.h>
#define YMMERR_NO_ENOUGH_SPACE 1
#define YMMERR_INVALID_SIZE  2
#define YMMERR_INVALID_ADDR  3
#define YMMERR_FAILED_TO_FREE  4
typedef struct YMM_map {
    unsigned int m_size;
    char *m_addr;
    struct YMM_map *pre, *nxt;
} YMM_map;
YMM_map *new_map();
void remove_map(YMM_map *victim);
void YMM_init(unsigned int size);
void YMM_release();
char *YMM_alloc(unsigned int size);
void YMM_free(unsigned int, char *);

extern int YMM_ERRNO;
extern char *YMM_addr;
extern unsigned int YMM_size;
extern YMM_map *YMM_fp;//this->m_addr=YMM_addr
extern YMM_map *YMM_cp;
#endif
